﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace QJ.MobileWeb.Models
{
    public class BaseModel
    {
        /// <summary>
        /// 创建接口返回值的封装对象
        /// </summary>
        /// <param name="isSucess"></param>
        /// <param name="msg"></param>
        /// <param name="data"></param>
        /// <returns></returns>
        protected WebApiMsg<T> CreateWebApiMsg<T>(int status, string msg, T data)
        {
            return new WebApiMsg<T>()
            {
                status = status,
                message = msg,
                data = data
            };
        }
        protected WebApiMsg CreateWebApiMsg(int status, string msg)
        {
            return new WebApiMsg()
            {
                status = status,
                message = msg
            };
        }
    }

    public class WebApiMsg
    {
        /// <summary>
        /// status 为返回状态 0 为成功 其他值 为失败
        /// </summary>
        public int status { get; set; }

        /// <summary>
        /// 失败时的错误信息
        /// </summary>
        public string message { get; set; }
    }
    /// <summary>
    /// WebApi返回数据的封装类
    /// </summary>
    public class WebApiMsg<T> : WebApiMsg
    {  
        /// <summary>
        /// 当返回数据或者列表时存放对应的数据
        /// </summary>
        public T data { get; set; }
    }



    public class MemberInfo
    {
        public long Id { get; set; }
        public string Org_AppId { get; set; }
        public string Login_No { get; set; }
        public string Nick_Name { get; set; }
        public string Real_Name { get; set; }
        public string Gender { get; set; }
        public string Birthday { get; set; }
        public string Phone { get; set; }
        public string Status { get; set; }
        public string Email { get; set; }
        public string RegisterDate { get; set; }
        public string Address { get; set; }
        public string Password { get; set; }
        public int Type { get; set; }
        public string Province { get; set; }
        public string City { get; set; }

    }
}